home *** CD-ROM | disk | FTP | other *** search
/ Aminet 30 / Aminet 30 (1999)(Schatztruhe)[!][Apr 1999].iso / Aminet / comm / misc / casio.lha / casio.doc next >
Text File  |  1998-05-17  |  13KB  |  303 lines

  1.                RCASIO/WCASIO Version 1k
  2.  
  3. 970619
  4.    rcasio and wcasio have been modified so that they will handle almost
  5.    all the special symbols and non-English letters (such as the stressed
  6.    vowels in Spanish). There are a few of the characters which still can't
  7.    be translated and these are printed in the casio.out file as a backslash
  8.    followed by the hexadecimal representation of the Casio character.
  9.  
  10. 980516 Version 1k
  11.    My Casio's batteries died and I lost everything. So I had to actually
  12.    use wcasio to try to restore the Casio from my backup file. It didn't
  13.    work very well.
  14.    Version 1k contains the fixes to wcasio to make it correctly upload all
  15.    items understood by a SF-4600B from a file previously created by rcasio.
  16.  
  17. USE AT YOUR OWN RISK. I have used the program to backup my casio many times
  18. and I have checked that data and found that it correctly stores all the
  19. info in the backup file. My Casio is an SF-4600B and is the only one that
  20. the program has been tested on so far.
  21. I also inadvertently deleted every entry in my phone book and used wcasio to
  22. restore all of it from the backup file so it appears to work well too.
  23. BUT USE AT YOUR OWN RISK!
  24.  
  25. In Version 1i I have modified the I/O routine used by WCASIO and I am hoping
  26. that it will now work properly for other Casio users.
  27. To test wcasio you can use the small test.dat file included with this
  28. archive to upload one test telephone entry to your Casio. If it works, you
  29. can always delete it from your Casio using option 2 with the FUNC key.
  30.  
  31. I've also included symbols.out which can also be uploaded to your Casio.
  32. It contains as many special symbols as I could find. rcasio translates
  33. Casio's codes for these symbols into the Amiga's codes and wcasio converts
  34. them back again. This will make the file produced by rcasio more readable
  35. for users of languages which use letters other than those in the English
  36. alphabet.
  37.  
  38. At the moment the programs must be used with the CLI. Once I have converted
  39. the code to the SAS compiler, I'll make a version which can use icons too.
  40.  
  41. The casio must be set to send/rcv 8 data bits, 1 stop bit and no parity.
  42.  
  43. 1. CASIO backup and restore
  44.  
  45.    Before using these two programs you should be aware of a few shortcomings
  46. in what the CASIO can backup and restore. If the CASIO is reset or totally
  47. loses power then, before you do anything else, you must enter the
  48. communication menu and reset the CASIO to 8 bit transmission (it powers up
  49. as 7) and set the correct baud rate, because you won't be able to restore
  50. from a backup file until this is done.
  51.  
  52.    The following items are also not backed up and must be restored manually:
  53.  
  54. - EVERY item in the HOME/WORLD menu, such as the home time, timezone, DST,
  55.    12/24hrs, sound settings etc. are reset and not saved by a backup.
  56.  
  57. - in the phone menu, the extra labels FREE 1, FREE 2 etc., are reset and are
  58.    not saved by the backup procedure. So if you change, for example, FREE 1
  59.    to FAX: then you must manually reset this yourself.
  60.  
  61.  
  62.    The backup program is called rcasio and all that is required to use it
  63. is to start it running and then using the CASIO menu to tell the CASIO to
  64. send all data. The rcasio program APPENDS all the received output to the
  65. file casio.out in the current directory. This allows you to select single
  66. items for backup from different menu items and append them all to one file
  67. if you wish to do so.
  68. Usually, though, you would backup all items and then rename casio.out to
  69. some other name.
  70.  
  71.    The default speed is 9600 baud and the default device is serial.device
  72. unit 0. These can be changed by using the -b, -s and -u arguments. E.G.
  73.  
  74.    rcasio -b4800 -sibmser.device -u2
  75.  
  76. will tell the rcasio program to use the ibmser.device unit 2 at 4800 baud.
  77.  
  78.  
  79. A word of caution here though. I have a GGII card with two serial ports
  80. which use ibmser.device and I found that although rcasio works fine, the
  81. wcasio program will only work correctly once and then your system has to be
  82. rebooted for it to work again, This appears to be a problem in the
  83. ibmser.device driver code because I don't have any trouble with the standard
  84. amiga serial port.
  85.  
  86. The rcasio program shows which type of item is being received from the Casio
  87. and shows a count of the items as they are received.
  88.  
  89.    The wcasio program is used to send data from a backup file to the Casio
  90. and has the same arguments as the rcasio program. You must always specify
  91. the name of a backup file as an argument to the program with the optional
  92. arguments first.
  93.  
  94. E.G.
  95.    wcasio -b4800 -sibmser.device -u3 all.out
  96.  
  97.    Both programs can also be used to save or restore private data. This
  98. should be done by saving to a separate file. You must enter your secret
  99. password to the CASIO before transferring the data, otherwise the data will
  100. be transferred to or from the main area.
  101.  
  102.  
  103. 2. CASIO Record Format
  104.  
  105.    The basic structure of the data sent between the Casio and a computer is
  106. similar to an INTEL HEX dump. Each record begins with a colon followed by
  107. four pairs of hexadecimal characters which describe the data on the current
  108. line. These four pairs of hex characters are always present. The remainder
  109. of the line depends upon the type of record and may contain pairs of hex
  110. data bytes. The last pair of hex characters on the line is always
  111. a two's complement checksum of all the preceding pairs of hex chars.
  112. The data are NOT sent as lines so each record does NOT have a CR/LF after
  113. it. To make the structure of the data easier to see, the records will be
  114. shown below as if there were a CR/LF after each one.
  115.  
  116.    If, for the moment, we assume that only one item (e.g. one phone number
  117. entry) in the Casio is transmitted, then the general structure of what is
  118. sent is:
  119.  
  120.    :Data Mode description record
  121.    :Entry 1 record 1
  122.    :Entry 1 record 2
  123.    :  "    "
  124.    :Entry 1 record n
  125.    :End of Entry Record
  126.    :End of Transmission Record
  127.  
  128.    The Data Mode description record specifies whether the following data
  129. entry is a phone book, memo, reminder, schedule, etc. entry.
  130.  
  131.    This is followed by several records which contain the actual data for
  132. this entry. For example, if a phone mode item is sent, there will be lines
  133. of data for the name entry, the phone number, the address and the Free
  134. entries.
  135.  
  136.    The End of Entry Record signifies the end of this specific Entry in the
  137. Casio.
  138.  
  139.    The End of Transmission Record (EOT) is actually not sent by the Casio if
  140. you send only one Entry, but if you send ALL data then the EOT is sent.
  141. If the Casio is in receive mode, the computer can send an EOT whenever it
  142. wishes and this will cause the Casio to exit from the data communication mode
  143. and return to whichever menu item you were in when you first selected data
  144. communication.
  145.  
  146.    When multiple entries are sent from one mode, one data mode record is
  147. sent followed by several Entry data records each of which is followed by an
  148. End of Entry Record.
  149.  
  150.    When all modes are sent, each block of entries are preceded by a Data
  151. Mode description record.
  152.  
  153. 3. Casio Protocol
  154.  
  155.    When data transfer is to take place, the transmitting end sends pairs
  156. of CR/LF until either the receiving end transmits an XON (0x11) or until
  157. a timeout is reached. The CR/LF pairs are sent roughly every half second by
  158. the Casio and it sends 15 of them before giving up. My "wcasio" program will
  159. send CR/LF until it sees the XON, a 60 second timeout timer expires, or
  160. until the user manually terminates the attempt by typing the Control-C
  161. character.
  162.  
  163.    Once the XON has been received, the data records are transmitted.
  164. Acknowledgement of correct receipt of records is only done after a Data Mode
  165. description record and an End of Entry Record (which means that for the
  166. End of Entry record the acknowledgement means that the checksum for the
  167. preceding data Entry records and this End of Entry Record are correct). If
  168. the checksum(s) is correct then a # is sent, otherwise a ? character is
  169. sent.
  170.  
  171.    The Casio will transmit a ! character if the user has manually
  172. terminated the data communication mode. This can happen whether it is
  173. sending or receiving.
  174.  
  175. 4. File format.
  176.  
  177.    The data in "casio.out" is stored in such a way that it can be
  178. read with a normal text editor such as "ed". This allows you to be able to
  179. read most of the data, such as the telephone directory. However, you must
  180. not change the data at all unless you know exactly what you are doing
  181. because you can introduce errors in to the file which prevent it from being
  182. restored to the Casio.
  183.    There are some changes you can make which will not cause a problem
  184. because the wcasio program recomputes the line lengths and checksums when it
  185. sends data to the Casio. Until I document this properly, or you really
  186. understand the format anyway, it's best to modify data in the Casio and then
  187. back it up.
  188.  
  189.  
  190. 5. Hardware Interface.
  191.  
  192.    Casio sells a hardware interface for the BOSS but it is very expensive
  193. for what it contains.
  194.  
  195.    I just made up a simple interface using the MAX-232 chip. There is
  196. another program on Aminet for the Casio BOSS which also contains a circuit
  197. diagram for an interface - see hard/misc/mcc040.lha
  198.  
  199.  
  200. Here's a brief description of the interface I use.
  201.  
  202. USE THIS AT YOUR OWN RISK.
  203.  
  204.          A homebrew interface to connect a Casio BOSS to an Amiga.
  205.  
  206.  
  207.    If you have a +5V supply then an interface using the MAX-232 chip is very
  208. easy to build.
  209.  
  210.    It requires only 4 electrolytic capacitors. The MAX-232 spec. sheet shows
  211. all 4 of them as 22uF although I used 2 x 4.7uF (Pins 1 and 4)
  212. and 2 x 47uF (Pins 2 and 6).
  213.  
  214.    Two of them are connected between pins 1 and 3, and 4 and 5 :
  215.  
  216.                   |  |
  217.               +ve |  | -ve
  218.       Pin 1  -----|  |------ Pin 3
  219.                   |  |
  220.                   |  |
  221.  
  222.  
  223.  
  224.                   |  |
  225.               +ve |  | -ve
  226.       Pin 4  -----|  |------ Pin 5
  227.                   |  |
  228.                   |  |
  229.  
  230.  
  231.    Then the third cap has its positive side connected to pin 2 and the
  232. negative side to ground. The fourth cap has its *negative* side connected to
  233. Pin 6 and the *positive* side goes to ground.
  234.  
  235.    The +5V supply goes to pin 16. Pin 15 is ground.
  236.  
  237.    The Amiga 1000 has a +5V output on Pin 21 of the DB25 serial device port
  238. and this can be connected directly to Pin 16 on the MAX-232.
  239.  
  240.    Unfortunately, all later Amigas changed the pinouts and do not have +5V on
  241. the DB25 serial device port.
  242.  
  243.    If you only have a +12V DC supply available then you'll have to use a 5V
  244. regulator to supply power to the chip. The absolute maximum DC supply
  245. rating at pin 16 for the MAX-232 is +6V and it would be best not to exceed
  246. about 5.5V to be on the safe side!
  247.  
  248.    If you use the +12V DC available on pin 9 of the later Amigas (such as the
  249. A3000) then you must be VERY careful not to short this pin to ground. It is
  250. fused and although the fuse itself costs about $5, having it replaced
  251. could cost as much as $100. In the A3000 the fuse is located at the back of
  252. the machine underneath the platform that supports the hard drive, floppy
  253. drive, and power supply which means that the entire machine must be taken
  254. apart just to get at that tiny fuse!
  255.  
  256.    The wiring for the Casio and the computer is as follows:
  257.  
  258.    Casio stereo plug:
  259.  
  260.                  MAX-232
  261.  
  262.    tip:          Pin 11 TTL/CMOS input
  263.    centre ring:  Pin 12 TTL/CMOS output
  264.    ground ring:  Pin 15 ground
  265.  
  266. I found that the only 3/32" stereo plugs I had in my junkbox were old Radio
  267. Shack ones and the plastic shell on these plugs is too wide to allow you to
  268. fit the plug in the Casio. So, instead, I use a 1/8" stereo plug and then use
  269. a Radio Shack stereo adapter from 1/8" to 3/32" (RS# 274-373). This adapter
  270. has a tapered end and will fit easily into the Casio jack.
  271.  
  272.    For a DB-25 the connections to the computer are:
  273.  
  274.    DB-25         MAX-232
  275.  
  276.      2           Pin 13 Rx RS-232 input
  277.      3           Pin 14 Tx RS-232 output
  278.      7           Pin 15 ground
  279.     6-20         no connection
  280.  
  281. At the db25 connector you must jumper Pin 20 to Pin 6. This takes the DTR
  282. output signal from Pin 20 and feeds it back into DSR in 6. The amiga serial
  283. routines will not read data from a serial port unless they see DSR active.
  284.  
  285. The other MAX-232 pins are unused and can be left floating.
  286. Just FYI they are:
  287.  
  288.    Pin 7  RS-232 output
  289.    Pin 8  RS-232 input
  290.    Pin 9  TTL/CMOS output
  291.    Pin 10 TTL/CMOS input
  292.  
  293.  
  294. Pete Hardie
  295.  
  296. Peter.Hardie@usask.ca
  297.  
  298. ACKNOWLEDGEMENTS. Thanks go to Vince Herried KA8CTE who supplied me with his
  299. serial I/O routines which work with some other Casio BOSS models. My old I/O
  300. routines would only work with my SF-4600B (still don't know why though).
  301. Further thanks to Oliver who discovered that SERF_RAD_BOOGIE makes the I/O
  302. routines work properly (Version 1h).
  303.